fimppfandomcom-20200216-history
Reports
Reports are collections of code in FiM++. A report contains all the code that will be run, as well as basic information about the program. Contents A report must have the following: * A name * A addressee (another report from which it gets basic paragraphs) * A beginning * An end * The programmer's name Related Phrases * Addressee specification ** * Interface listing ** * Report Ending ** Name Restrictions Each report name has the following restrictions: * Must not contain any keywords (However, operators and literals are okay) * Must not contain any punctuation * Must begin with one non-whitespace, non-literal character * Must end with one non-whitespace character character Freedoms Each report name also has the following freedoms: * There is no hard limit on the length * May have any whitespace character in them * May contain literals, as long as they are not at the beginning of the name * May contain apostrophes * Encoded in UTF-8 Examples Here are some examples of good report names: * }} * }} ** Report names don't have to start with "Princess", or even be a character's name. * }} ** Even though is used to declare character literals, it is used in the middle of a name, so it is okay. * }} ** Even though is a literal, FiM++ is case-sensitive, so is valid for report naming. * }} ** Even though is always a literal, it is not the at the beginning of the name, so it's okay. Here are some examples of bad report names: * }}}} ** is always a keyword, so this will not compile. ** The compiler sees that a keyword has been used and ends the report name, then does not see a punctuation mark and, furthermore, does not know what to do with the phrase. ** The compiler would throw an Unexpected Token Error * }} ** compiler thinks " " is the end of the report name "Hay", and doesn't know what to do with the word "Celly" ** The compiler would throw a Malformed Sentence Error, because "Celly" is not a complete sentence * Sup}}}} ** is used to start a character literal, so the compiler sees this as an unclosed character literal. ** The compiler would throw both an Unexpected Token Error an Unclosed Character Literal Error * }} }} ** is always a literal, so it cannot be the beginning of a report name. ** The compiler would throw an Unexpected Token Error The Addressee Every report must have an addressee. If a report does not explicitly define an addressee, then it will not compile. The only report that does not have an addressee is the base report . If you don't want to define a new addressee, use . Structure Reports must be written in the following structure: (Optional imports; any number) Addressee specification; exactly one (Optional interfaces) Report declaration; exactly one (Optional paragraphs; any amount) Report closing; exactly one Author name comment; exactly one Imports : }} Declaration FDS : nothing}}/ ... }} Global variables Any variable declared inside the report that is not declared in a paragraph is a global variable. That is to say, it can be accessed from any report paragraph at any time Paragraphs Paragraphs contain most of the code inside a report that runs Closing Reports must be closed using the text , followed by a punctuation, followed by the programmer's name, followed by another punctuation. The programmer's name is a special comment, in that it is automatically started, ended with punctuation, and can be inserted into the final compiled file unchanged. : }} See Also * Paragraphs * Variables